<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Source: tool/MarkdownEditor.js</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Source: tool/MarkdownEditor.js</h1>

    



    
    <section>
        <article>
            <pre class="prettyprint source linenums"><code>/**
 * Created by seeker910 on 2022/4/22.
 * @description markdown 文件编辑器
 */ 
 Rsd.define('Rsd.tool.MarkdownEditor', {
    extend: 'Rsd.container.Dialog',
    requires: [
        'Rsd.form.Button',
        'Rsd.form.Label',
        'Rsd.form.Link',
        'Rsd.form.CheckBox',
        'Rsd.control.IframeBox',
        'Rsd.control.ListView'
    ],
    editorHeight:'100%',
    /**
     * 是否显示目录栏
     */
    showIndex:true,
    /**
     * 是阅读模式
     */
    isView:false,
    /**
     * 文档索引编辑函数
     */
    indexEditServiceName:null,
    /**
     * 文档索引加载函数
     */
    indexLoadServiceName:'global.merch.doc.GetDocPageList',
    /**
     * 文件下载服务名称
     */
    fileDownloadServiceName:'aliyun.merch.oss.cms.download',
    /**
     * 上传
     */
    fileUploadServiceName:'aliyun.merch.oss.cms.upload',
    /**
     * 
     */
    layout:'hbox',
    /**
     * 
     */
    items:[
        {
            xtype:'list-view',
            itemXtype:'link',
            itemKeyMember:'key',
            label:{
                xtype:'link', 
                text:'[刷 新]',
                width:'100%',
                height:'40px',
                margin:'3px 0 3px 0',
                label:{
                    width:120,
                    content:'页面列表',
                    align:'center',
                    style:{
                            color:'#000', 
                            cursor: 'default',
                            textAlign:'left',
                            //fontWeight:'Bold',
                            fontSize:'130%',  
                            borderBottom: '1px darkgrey dotted'
                        }
                },
                ctrl:{
                    style:{
                        //element:'ctrl', 
                        color: '#fff',  
                        backgroundColor: '#b92525f0',
                        cursor: 'pointer',
                        lineHeight:'40px', 
                        borderRadius: '4px'
                    }     
                }
                   
            },
            margin:'0 0 0 10',
            width:200,
            height:'100%',
            layout:'vbox',
            itemClick:'pageIndexChanged',
            dataSource:null

        },
        {
            xtype:'iframe', 
            flex:1,
            //width:'100%',
            height:'100%', 
            src:'javascript:void(0)',
            ctrl:{style:{boder:'1px red solid'}},
            onload:'iframe_load',
            label:{
                position:'bottom',
                space:0,
                xtype:'container',
                header:false,
                height:60,
                style:{lineHeight:60},
                items:[
                    {
                        xtype:'checkbox',
                        width:120,
                        height:30,
                        checked:true,
                        margin:'5 0 0 60',
                        label:{
                            position:'right',
                            width:90,
                            content:'自动保存',
                            style:{color:'#000',fontSize:'120%'}
                        },
                        tip:'勾选后,每5分钟自动保存',
                        onchange:'on_checked'
                    },
                    {
                        xtype:'button',
                        height:40,
                        width:120,
                        text:'保存文件(S)',
                        handler:'btn_save'
                    },
                    {
                        xtype:'label',
                        text:'按 ctrl+s 保存文件',
                        style:{color:'#000',fontSize:'120%'},
                        height:40,
                        width:160,
                    },
                    {
                        xtype:'label',
                        text:'上次保存时间：',
                        style:{color: '#999289',textAlign:'left'},
                        height:40,
                        width:200,
                    },
                    {
                        xtype:'button',
                        height:40,
                        width:100,
                        margin:'0 10',
                        style:{
                            float: 'right', 
                            backgroundColor:'#7d4f0cd1'
                        },
                        text:'发 布',
                        handler:'btn_publish'
                    },
                    {
                        xtype:'button',
                        height:40,
                        width:100,
                        margin:'0 10',
                        style:{
                            float: 'right', 
                            backgroundColor:'#034e09bd'
                        },
                        text:'分 享',
                        handler:'btn_share'
                    },
                    {
                        xtype:'button',
                        height:40,
                        width:100,
                        margin:'0 10',
                        style:{
                            float: 'right', 
                            backgroundColor:'#7a013dcc'
                        },
                        text:'预 览',
                        handler:'btn_preview'
                    }
                ]
            }
        } 
    ],
    /**
     * 文档信息
     */
    doc:{Id:null,Key:null,Name:''},
    /**
     * 
     * @param {*} config 
     */
    constructor: function MarkdownEditor(config) {

        config = config || {};
        this.apply(config);
        var me = this;

        me.items[1].src = Rsd.getRedjsHost()+'plugin/editormd/app/'+ (me.isView?'view':'edit') +'.html?h='+me.editorHeight;

        if(!this.showIndex)
        {
            this.items[0].hidden = true;
        }
        if(this.isView)
        {
            this.items[0].label = {
                content:'页&amp;nbsp;面&amp;nbsp;列&amp;nbsp;表&amp;nbsp;&amp;nbsp;', 
                style:{
                    borderBottom: '1px darkgrey dotted',
                    color:'#000',
                    fontSize:'130%'
                }
            };
            this.items[1].label =false;
        }
        else
        {
            this.items[0].label.handler = function(){
                me.loadIndex();
            };
        }
        Rsd.app.mdEditorContainer = me;
    },
    /** 
     * @param {*} key 
     */
    load:function load()
    {
        this.callParent();
    },
    /**
     * 
     */
    loadIndex:function loadIndex()
    {
        var me = this;
        
        me.loadDocPages(function(indexList){
                 
            for(var i in indexList)
            { 
                var item = indexList[i];
                if(item.key)
                {
                    item.style = item.style || {fontSize:'120%',overflow:'hidden'};
                    //章节 页面加载 
                    item.handler = function(){ 
                        //console.log(this);
                        me.selectPage(this.key);
                   }; 
                }
                
            }

            me.items[0].loadData(indexList);
        });
    },
     /**
     * 
     * @param {*} row 
     * @param {*} callback 
     */
     loadDocPages:function loadDocPages(callback)
     {
         var me = this;
         var isView = me.isView;
         var docId = me.doc.Id;
         var docKey = me.doc.Key;
         var docName = me.doc.Name;
 
         var list = [{text:' 首 页 ', width:'100%',key:docKey}];
             //获取索引
             Rsd.app.requestService(me.indexLoadServiceName,{key:docKey},function(resp){
                 
                 if(resp.success)
                 {
                     for(var i in resp.data)
                     {
                         var no = Number(i) + 1;
                          //{text:'第一章：xxxxxxxx',width:'100%',handler:function(){alert(this.text);}},
                         list.push({
                             key:resp.data[i].Key,
                             label:'第'+ no +'章：' + resp.data[i].Title,
                             width:'100%',
                             tip: resp.data[i].Title + ':' + resp.data[i].Description
                         });
                     }
                     
                 }
 
                 if(isView)
                 {}
                 else
                 {
                     list.push({
                         xtype:'container',
                         width:'100%',
                         items:[
                                 {
                                     xtype:'link',
                                     text:' 添加新页面 ',
                                     width:'50%',
                                     height:40, 
                                     style:{
                                         element:'ctrl',
                                         textDecoration:'underline',
                                         textAlign:'right',
                                         //fontWeight:'Bold',
                                         fontSize:'130%',
                                         //backgroundColor: '#03127eb5',
                                         color:'#f70000d9' 
                                     },
                                     handler:function() {
                         
                                         Rsd.create('Rsd.zen.dialog.FormDialog',{
                                             style:{maxHeight:'100%'},
                                             docKey:docKey,
                                             readOnly: false, 
                                             height:'100%',
                                             width:500,
                                             delayShow:50,
                                             header:{content:'添加新页面'},
                                             style:{borderRadius:0,maxHeight:'100%'},
                                             formFields:[
                                                {
                                                    xtype:'text',
                                                    label:'名称',
                                                    width:'80%'
                                                },
                                                {
                                                    xtype:'text',
                                                    label:'描述',
                                                    width:'80%'
                                                }
                                             ],
                                             labelWidth:100,
                                             buttons:['save','delete'],
                                             saveHandler:function(data){
                                                alert('save');
                                             },
                                             afterNewHandler:function(newObj)
                                             {
                                                 me.loadDocPages(isView,row,callback);
                                             }
                                         }).showDialog(document.body,{left:-550,top:0},{left:0,top:0},500);
                                     
                                     }
                                 },
                                 {
                                     xtype:'link',
                                     text:' 查看详情 ',
                                     width:'50%',
                                     height:40, 
                                     style:{
                                         element:'ctrl',
                                         textDecoration:'underline',
                                         textAlign:'right',
                                         //fontWeight:'Bold',
                                         fontSize:'110%',
                                         //backgroundColor: '#03127eb5',
                                         color:'#160404ba', 
                                     },
                                     handler:function() {
                         
                                         var mdEditor = this.parent.parent;
                                         Rsd.create('Rsd.CMS.pages.DocPageListDialog',{
                                             parent:mdEditor,
                                             //autoLoad:true,
                                             title:docName +' - 目录编辑', 
                                             formTitle:'目录', 
                                             where:[{name:'DocId',op:'equals',value:docId}],
                                             sort:[{name:'IndexCode',direction:'asc'}], 
                                         
                                         }).showDialog(mdEditor).load();
                                             
                                 }
                             }
                         ]
                      });
  
                 }
                  
                 callback(list);
             });
     },
    /**
     * 
     * @param {*} key 
     */
    selectPage:function selectPage(key)
    { 
        var me = this;
        
        var _fn_relocate = function(){

            me.download(key);
        }

        var c_win = me.items[1].ctrl.element.contentWindow;

        var _fn  = function(){
            
            if(c_win.isChanged)
            {
                Rsd.showMessage('文档已修改，是否保存？',[
                    {
                        text:'保 存',
                        fn:function(){ me.upload(false,_fn_relocate);  }
                    },
                    {text:'不保存',fn:_fn_relocate}
                ]);
            }
            else
            {
                _fn_relocate();
            }
        }
         
        if(c_win)
        {
            _fn();
        }
        else
        {
            var _id = setInterval(function(){

                c_win = me.items[1].ctrl.element.contentWindow;
                if(c_win)
                {
                    clearInterval(_id);
                    _fn();
                }
               
            },100);
        }
        
        //
    },
    /**
     * 
     * @param {*} key 
     */
    download:function download(key)
    {
        if(Rsd.isEmpty(key))
        { 
            return;
        }
        var me = this;
        Rsd.app.requestService(this.fileDownloadServiceName,{filename:key+".md"}, function(resp) {
                    
            if(!resp.success)
            {
                return;
            }
            //更新当前key
            me.key = key;
            
            //清除自动保存
            if(me.__interval_id)
            {
                window.clearInterval(me.__interval_id);
            }

            me.render_html(resp.data,function(){
                //在成功渲染后 开启自动保存 放在在未加载前 触发保存 污染数据
                me.__interval_id = setInterval(function(){me.upload(true,null);},5*1000*60);
            });

            var c_win = me.items[1].ctrl.element.contentWindow; 

            //绑定预览事件
            if(me.items[1].label 
                &amp;&amp; me.items[1].label.content 
                &amp;&amp; c_win.bindPreviewEvent)
            {
                c_win.bindPreviewEvent(function(isPreview){
                        var btn = me.items[1].label.content.items[6].ctrl.element;
                        btn.innerHTML = isPreview?'关闭预览':'预 览';
                    });
            }
            //设置保存方法
            if(c_win.bindSaveFunction)
            {
                c_win.bindSaveFunction(function(){me.upload(false,null);});
            }
            
        });
                
               
    },
    /**
     * 上传文件
     * @param {*} autoSave 是否是自动保存
     * @param {*} callback 保存后回调方法
     */
     upload:function upload(autoSave,callback)
     {
         var me = this;
         var key = me.key;
         if(Rsd.isEmpty(key))
         {
            Rsd.alert('无法保存文件。');
            return;
         }
         if(!me.items[1])
         {
            window.clearInterval(me.__interval_id);
            return;
         }
         var c_win = me.items[1].ctrl.element.contentWindow;
         var code = c_win.getFileCode();
         var file = new File([new Blob([code])], key+'.md', {type: 'text/x-markdown'});
         var data = {}; 
         data['files'] = file;
         data['desc'] = '这是来自CMS的MD文件内容';
 
         var service = top.Rsd.app.getService(me.fileUploadServiceName);
         
        
         //application/x-www-form-urlencoded =》 未找到上传文件 
         //application/form-data    => Incorrect Content-Type: application/form-data 
         //text/plain               => Incorrect Content-Type: text/plain  
         //multipart/form-data      => Missing Content-Type Broundary=XXXX 
         service.server.contentType = "multipart/form-data";// 该设置 让ajax 将 data 转化为FormData
         service.server.accept="application/json, text/javascript, */*; q=0.01";   
         service.request(data,function(resp){
             if(resp.success)
             {
                  if(autoSave)
                  {
                     Rsd.popup('已自动保存');
                  }
                  else
                  {
                     Rsd.popup('保存成功');
                  }
 
                 var time =  Rsd.formatTimestamp(Date.now(),"yyyy-MM-dd hh:mm:ss");
                 c_win.changeTime = time;
                 c_win.isChanged = false;
                 //更新 页面提示时间
                  me.items[1].label.content.items[3].setValue(time);
                 if(callback)
                 {
                     callback();
                 }
             }
         });
 
     },
    /**
     * 
     * @param {*} listItem 
     */
    pageIndexChanged:function pageIndexChanged(listItem)
    {
        if(listItem.key &amp;&amp; listItem.key != this.key)
        {
           this.selectPage(listItem.key);
        }
         
    },
    /**
     * 
     * @param {*} evt 
     * @returns 
     */
    iframe_load:function iframe_load(evt)
    {
        var me = this;
        if(evt.target.src !== me.items[1].src)
        {
            return;
        }
        var c_win = me.items[1].ctrl.element.contentWindow;
        if(c_win.document.readyState !== "complete")
        {
            return;
        } 
        if(me.data)
        {
            me.render_html(me.data,null);
            
        } 
        if(me.key)
        {
            //
            me.selectPage(me.key); 
            //目录信息
            me.loadIndex(); 
        } 
    },
    /**
     * 
     * @param {*} data 
     * @param {*} callback 
     * @returns 
     */
    render_html:function render_html(data,callback)
    {
        var me = this;
        var c_win = me.items[1].ctrl.element.contentWindow;
         if(c_win.render)
         {
             c_win.render(data,callback);

             return;
         }
           
         console.error(c_win.location.href + "未实现接口:render");
    },
    /**
     *  
     */
    on_checked:function(sender,evt)
    { 
        var me = this;
        if(sender.isChecked())
        {
                clearInterval(me.__interval_id);
                me.__interval_id = setInterval(function(){me.upload(true,null);},5*1000*60);
                Rsd.popup('自动保存已开启');
        }
        else
        {
                clearInterval( me.__interval_id);
                Rsd.popup('自动保存已关闭');
        }    
    },
    /**
     * 
     */
    btn_save:function btn_save()
    {
        this.upload(false,null);
    },
    /**
     * 
     */
    btn_preview:function btn_preview()
    {
        var me = this;
        var c_win = me.items[1].ctrl.element.contentWindow;
        c_win &amp;&amp; c_win.previewFile();
    },
    /**
     * 
     */
    btn_share:function btn_share()
    {
        Rsd.popup('扫码 或 复制 连接 分享');
    },
    /**
     * 
     */
    btn_publish:function btn_publish()
    {
        Rsd.popup('发布html到网站');
    },
    /**
     * 
     */
    beforeClose:function beforeClose()
    {
        var me = this;
        if(me.closeWithoutSaving===true)
        {
            delete me.closeWithoutSaving;
            return;
        }
        //通过dialog.closeCancel 进行关闭拦截： 如果修改后未保存，阻止窗体关闭
        var c_win = me.items[1].ctrl.element.contentWindow;
        me.closeCancel = c_win.isChanged;

        if(me.closeCancel)
        {
            Rsd.showMessage('文档已修改，是否保存？',[
                {
                    text:'保存并关闭',
                    width:85,
                    height:32,
                    style:{
                        element:'ctrl',
                        color:'#fff',
                        backgroundColor: '#1744a9bd'
                    },
                    fn:function(){ 
                        me.upload(false,function(){me.close();}); 
                    }
                },
                {
                    text:'关闭(不保存)',
                    width:95,
                    height:32,
                    style:{
                        element:'ctrl',
                        color:'#fff',
                        backgroundColor: '#9a1204e6'
                    },
                    fn:function(){ 
                        me.closeWithoutSaving = true;
                        me.closeCancel =false;
                        me.close();
                        
                    }
                },
                {
                    text:'取消(继续编辑)',
                    width:105,
                    height:32,
                }
                ]);
        }
    }

},function(type){

  
      
});</code></pre>
        </article>
    </section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="global.html#Rsd">Rsd</a></li><li><a href="Rsd.common.html">common</a></li><li><a href="Rsd.container.html">container</a></li><li><a href="Rsd.control.html">control</a></li><li><a href="Rsd.data.html">data</a></li><li><a href="Rsd.template.html">template</a></li><li><a href="Rsd.widget.html">widget</a></li></ul><h3>Classes</h3><ul><li><a href="Redjs.html">Redjs</a></li><li><a href="Rsd.data.Ajax.html">Ajax</a></li><li><a href="Rsd.data.ModelSchema.html">ModelSchema</a></li><li><a href="Rsd.data.Service.html">Service</a></li><li><a href="window.Rsd.LogApi.html">LogApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#gbkToUTF8">gbkToUTF8</a></li><li><a href="global.html#mmToPx">mmToPx</a></li><li><a href="global.html#pxToMm">pxToMm</a></li><li><a href="global.html#unicodeToUTF8">unicodeToUTF8</a></li><li><a href="global.html#_btn_preview">_btn_preview</a></li><li><a href="global.html#_btn_save">_btn_save</a></li><li><a href="global.html#_imageItemDblClick">_imageItemDblClick</a></li><li><a href="global.html#accept">accept</a></li><li><a href="global.html#add">add</a></li><li><a href="global.html#addCls">addCls</a></li><li><a href="global.html#addControl">addControl</a></li><li><a href="global.html#addCookie">addCookie</a></li><li><a href="global.html#addItem">addItem</a></li><li><a href="global.html#addNode">addNode</a></li><li><a href="global.html#addObject">addObject</a></li><li><a href="global.html#addService">addService</a></li><li><a href="global.html#addTotalRow">addTotalRow</a></li><li><a href="global.html#addTreeNode">addTreeNode</a></li><li><a href="global.html#afterClose">afterClose</a></li><li><a href="global.html#afterShow">afterShow</a></li><li><a href="global.html#albumsItemDblClick">albumsItemDblClick</a></li><li><a href="global.html#albumsItemViewDetail">albumsItemViewDetail</a></li><li><a href="global.html#allFields">allFields</a></li><li><a href="global.html#alwaysWrap">alwaysWrap</a></li><li><a href="global.html#animate">animate</a></li><li><a href="global.html#appId">appId</a></li><li><a href="global.html#app_afterLayout">app_afterLayout</a></li><li><a href="global.html#apply">apply</a></li><li><a href="global.html#arrayConcat">arrayConcat</a></li><li><a href="global.html#authCode">authCode</a></li><li><a href="global.html#authorization">authorization</a></li><li><a href="global.html#autoCompleteHandler">autoCompleteHandler</a></li><li><a href="global.html#autoExpanded">autoExpanded</a></li><li><a href="global.html#autoLoad">autoLoad</a></li><li><a href="global.html#autoScrollIntoView">autoScrollIntoView</a></li><li><a href="global.html#backgroundImage">backgroundImage</a></li><li><a href="global.html#beforeClose">beforeClose</a></li><li><a href="global.html#beforeShow">beforeShow</a></li><li><a href="global.html#bgColors">bgColors</a></li><li><a href="global.html#bindEvent">bindEvent</a></li><li><a href="global.html#blankspan">blankspan</a></li><li><a href="global.html#block">block</a></li><li><a href="global.html#border">border</a></li><li><a href="global.html#btn_add">btn_add</a></li><li><a href="global.html#btn_add_albums">btn_add_albums</a></li><li><a href="global.html#btn_close">btn_close</a></li><li><a href="global.html#btn_new_image">btn_new_image</a></li><li><a href="global.html#btn_preview">btn_preview</a></li><li><a href="global.html#btn_publish">btn_publish</a></li><li><a href="global.html#btn_refesh_ds">btn_refesh_ds</a></li><li><a href="global.html#btn_refresh">btn_refresh</a></li><li><a href="global.html#btn_reset">btn_reset</a></li><li><a href="global.html#btn_save">btn_save</a></li><li><a href="global.html#btn_save_and_publish">btn_save_and_publish</a></li><li><a href="global.html#btn_share">btn_share</a></li><li><a href="global.html#btn_show_selector">btn_show_selector</a></li><li><a href="global.html#build">build</a></li><li><a href="global.html#buildColumns">buildColumns</a></li><li><a href="global.html#buildRows">buildRows</a></li><li><a href="global.html#buildTree">buildTree</a></li><li><a href="global.html#button">button</a></li><li><a href="global.html#callFunction">callFunction</a></li><li><a href="global.html#changeCls">changeCls</a></li><li><a href="global.html#checkRecord">checkRecord</a></li><li><a href="global.html#checkSessionServiceName">checkSessionServiceName</a></li><li><a href="global.html#checkToken">checkToken</a></li><li><a href="global.html#checkValue">checkValue</a></li><li><a href="global.html#checkbox">checkbox</a></li><li><a href="global.html#circle">circle</a></li><li><a href="global.html#clear">clear</a></li><li><a href="global.html#clearHotKey">clearHotKey</a></li><li><a href="global.html#clearLocal">clearLocal</a></li><li><a href="global.html#clearSelected">clearSelected</a></li><li><a href="global.html#clearSession">clearSession</a></li><li><a href="global.html#clone">clone</a></li><li><a href="global.html#close">close</a></li><li><a href="global.html#closeBtn">closeBtn</a></li><li><a href="global.html#closeDB">closeDB</a></li><li><a href="global.html#closeDropdownBox">closeDropdownBox</a></li><li><a href="global.html#closeLoading">closeLoading</a></li><li><a href="global.html#closeWaiting">closeWaiting</a></li><li><a href="global.html#codeMember">codeMember</a></li><li><a href="global.html#collapseAll">collapseAll</a></li><li><a href="global.html#colorMember">colorMember</a></li><li><a href="global.html#compile">compile</a></li><li><a href="global.html#compress">compress</a></li><li><a href="global.html#constructor">constructor</a></li><li><a href="global.html#contain">contain</a></li><li><a href="global.html#containCls">containCls</a></li><li><a href="global.html#copy">copy</a></li><li><a href="global.html#createInnerControl">createInnerControl</a></li><li><a href="global.html#crossDomain">crossDomain</a></li><li><a href="global.html#currentIndex">currentIndex</a></li><li><a href="global.html#data">data</a></li><li><a href="global.html#dataSource">dataSource</a></li><li><a href="global.html#dataStore">dataStore</a></li><li><a href="global.html#dataType">dataType</a></li><li><a href="global.html#daysStyle">daysStyle</a></li><li><a href="global.html#debug">debug</a></li><li><a href="global.html#decodeURI">decodeURI</a></li><li><a href="global.html#defineEnums">defineEnums</a></li><li><a href="global.html#defineRem">defineRem</a></li><li><a href="global.html#delay">delay</a></li><li><a href="global.html#deleteCookie">deleteCookie</a></li><li><a href="global.html#deleteDB">deleteDB</a></li><li><a href="global.html#deleteObject">deleteObject</a></li><li><a href="global.html#deleteRow">deleteRow</a></li><li><a href="global.html#deleteService">deleteService</a></li><li><a href="global.html#detectNavigator">detectNavigator</a></li><li><a href="global.html#detectOS">detectOS</a></li><li><a href="global.html#doLayout">doLayout</a></li><li><a href="global.html#doc">doc</a></li><li><a href="global.html#domTagName">domTagName</a></li><li><a href="global.html#download">download</a></li><li><a href="global.html#draggable">draggable</a></li><li><a href="global.html#drawCaption">drawCaption</a></li><li><a href="global.html#drawImage">drawImage</a></li><li><a href="global.html#drawList">drawList</a></li><li><a href="global.html#dsSchema">dsSchema</a></li><li><a href="global.html#dstype_change">dstype_change</a></li><li><a href="global.html#dynamic">dynamic</a></li><li><a href="global.html#edit">edit</a></li><li><a href="global.html#editRow">editRow</a></li><li><a href="global.html#empty">empty</a></li><li><a href="global.html#emptyImage">emptyImage</a></li><li><a href="global.html#encodeURI">encodeURI</a></li><li><a href="global.html#enumLabel">enumLabel</a></li><li><a href="global.html#enumText">enumText</a></li><li><a href="global.html#error">error</a></li><li><a href="global.html#exchange">exchange</a></li><li><a href="global.html#exeHotKeyFun">exeHotKeyFun</a></li><li><a href="global.html#expandAll">expandAll</a></li><li><a href="global.html#export">export</a></li><li><a href="global.html#fieldWidth">fieldWidth</a></li><li><a href="global.html#file">file</a></li><li><a href="global.html#fileDownloadServiceName">fileDownloadServiceName</a></li><li><a href="global.html#fileUploadServiceName">fileUploadServiceName</a></li><li><a href="global.html#findNode">findNode</a></li><li><a href="global.html#findObject">findObject</a></li><li><a href="global.html#findService">findService</a></li><li><a href="global.html#fire">fire</a></li><li><a href="global.html#fireResize">fireResize</a></li><li><a href="global.html#firstPage">firstPage</a></li><li><a href="global.html#fixed">fixed</a></li><li><a href="global.html#floating">floating</a></li><li><a href="global.html#formatApi">formatApi</a></li><li><a href="global.html#formatCurrency">formatCurrency</a></li><li><a href="global.html#formatCurrencyCN">formatCurrencyCN</a></li><li><a href="global.html#formatJson">formatJson</a></li><li><a href="global.html#formatLabels">formatLabels</a></li><li><a href="global.html#formatNumber">formatNumber</a></li><li><a href="global.html#formatString">formatString</a></li><li><a href="global.html#formatTimestamp">formatTimestamp</a></li><li><a href="global.html#from">from</a></li><li><a href="global.html#fullScreen">fullScreen</a></li><li><a href="global.html#funApplyByIOC">funApplyByIOC</a></li><li><a href="global.html#funBindByIOC">funBindByIOC</a></li><li><a href="global.html#get">get</a></li><li><a href="global.html#getApp">getApp</a></li><li><a href="global.html#getAppAuthorization">getAppAuthorization</a></li><li><a href="global.html#getAppConfig">getAppConfig</a></li><li><a href="global.html#getAppId">getAppId</a></li><li><a href="global.html#getAppToken">getAppToken</a></li><li><a href="global.html#getByteLength">getByteLength</a></li><li><a href="global.html#getCheckedNodes">getCheckedNodes</a></li><li><a href="global.html#getColumns">getColumns</a></li><li><a href="global.html#getControl">getControl</a></li><li><a href="global.html#getControlConfig">getControlConfig</a></li><li><a href="global.html#getCookie">getCookie</a></li><li><a href="global.html#getDPI">getDPI</a></li><li><a href="global.html#getData">getData</a></li><li><a href="global.html#getDocConfig">getDocConfig</a></li><li><a href="global.html#getDocument">getDocument</a></li><li><a href="global.html#getDom">getDom</a></li><li><a href="global.html#getElAttribute">getElAttribute</a></li><li><a href="global.html#getFieldValue">getFieldValue</a></li><li><a href="global.html#getFields">getFields</a></li><li><a href="global.html#getFile">getFile</a></li><li><a href="global.html#getFileName">getFileName</a></li><li><a href="global.html#getFormData">getFormData</a></li><li><a href="global.html#getFunctionName">getFunctionName</a></li><li><a href="global.html#getGlobalVariable">getGlobalVariable</a></li><li><a href="global.html#getHeight">getHeight</a></li><li><a href="global.html#getItem">getItem</a></li><li><a href="global.html#getItemById">getItemById</a></li><li><a href="global.html#getItemByName">getItemByName</a></li><li><a href="global.html#getItemByXtype">getItemByXtype</a></li><li><a href="global.html#getJsonSchema">getJsonSchema</a></li><li><a href="global.html#getKeyValue">getKeyValue</a></li><li><a href="global.html#getObjectByIndex">getObjectByIndex</a></li><li><a href="global.html#getObjectByKey">getObjectByKey</a></li><li><a href="global.html#getPaging">getPaging</a></li><li><a href="global.html#getPlugin">getPlugin</a></li><li><a href="global.html#getRecord">getRecord</a></li><li><a href="global.html#getRedjsHost">getRedjsHost</a></li><li><a href="global.html#getRedjsUrl">getRedjsUrl</a></li><li><a href="global.html#getRowData">getRowData</a></li><li><a href="global.html#getSchema">getSchema</a></li><li><a href="global.html#getSchemaList">getSchemaList</a></li><li><a href="global.html#getScrollHeight">getScrollHeight</a></li><li><a href="global.html#getSelectedNodes">getSelectedNodes</a></li><li><a href="global.html#getService">getService</a></li><li><a href="global.html#getStringWidth">getStringWidth</a></li><li><a href="global.html#getText">getText</a></li><li><a href="global.html#getTouched">getTouched</a></li><li><a href="global.html#getType">getType</a></li><li><a href="global.html#getUrlParam">getUrlParam</a></li><li><a href="global.html#getUserAgent">getUserAgent</a></li><li><a href="global.html#getValue">getValue</a></li><li><a href="global.html#getValueItem">getValueItem</a></li><li><a href="global.html#getView">getView</a></li><li><a href="global.html#getWhere">getWhere</a></li><li><a href="global.html#getWidth">getWidth</a></li><li><a href="global.html#getXhr">getXhr</a></li><li><a href="global.html#getZIndex">getZIndex</a></li><li><a href="global.html#globalVariables">globalVariables</a></li><li><a href="global.html#goTo">goTo</a></li><li><a href="global.html#gridColumns">gridColumns</a></li><li><a href="global.html#handleEvent">handleEvent</a></li><li><a href="global.html#handleUploadEvent">handleUploadEvent</a></li><li><a href="global.html#hasProperty">hasProperty</a></li><li><a href="global.html#hidden">hidden</a></li><li><a href="global.html#hide">hide</a></li><li><a href="global.html#httpGet">httpGet</a></li><li><a href="global.html#httpPost">httpPost</a></li><li><a href="global.html#httpRequest">httpRequest</a></li><li><a href="global.html#iframe_load">iframe_load</a></li><li><a href="global.html#imageDblClick">imageDblClick</a></li><li><a href="global.html#images">images</a></li><li><a href="global.html#indexEditServiceName">indexEditServiceName</a></li><li><a href="global.html#indexLoadServiceName">indexLoadServiceName</a></li><li><a href="global.html#info">info</a></li><li><a href="global.html#init">init</a></li><li><a href="global.html#initComponent">initComponent</a></li><li><a href="global.html#initComponentEx">initComponentEx</a></li><li><a href="global.html#initDropdownBox">initDropdownBox</a></li><li><a href="global.html#initImage">initImage</a></li><li><a href="global.html#insertItem">insertItem</a></li><li><a href="global.html#insertObject">insertObject</a></li><li><a href="global.html#insertService">insertService</a></li><li><a href="global.html#inset">inset</a></li><li><a href="global.html#isArray">isArray</a></li><li><a href="global.html#isBoolean">isBoolean</a></li><li><a href="global.html#isChrome">isChrome</a></li><li><a href="global.html#isCreated">isCreated</a></li><li><a href="global.html#isDate">isDate</a></li><li><a href="global.html#isDestroyed">isDestroyed</a></li><li><a href="global.html#isDisabled">isDisabled</a></li><li><a href="global.html#isEmpty">isEmpty</a></li><li><a href="global.html#isFunction">isFunction</a></li><li><a href="global.html#isHidden">isHidden</a></li><li><a href="global.html#isLoading">isLoading</a></li><li><a href="global.html#isMobile">isMobile</a></li><li><a href="global.html#isNaN">isNaN</a></li><li><a href="global.html#isNull">isNull</a></li><li><a href="global.html#isNullOrUndefined">isNullOrUndefined</a></li><li><a href="global.html#isNumber">isNumber</a></li><li><a href="global.html#isObject">isObject</a></li><li><a href="global.html#isReady">isReady</a></li><li><a href="global.html#isRendered">isRendered</a></li><li><a href="global.html#isString">isString</a></li><li><a href="global.html#isTrue">isTrue</a></li><li><a href="global.html#isType">isType</a></li><li><a href="global.html#isUndefined">isUndefined</a></li><li><a href="global.html#isView">isView</a></li><li><a href="global.html#isWeChat">isWeChat</a></li><li><a href="global.html#isWeChatApp">isWeChatApp</a></li><li><a href="global.html#itemCls">itemCls</a></li><li><a href="global.html#itemKeyMember">itemKeyMember</a></li><li><a href="global.html#itemLabelWidth">itemLabelWidth</a></li><li><a href="global.html#itemSelectedCls">itemSelectedCls</a></li><li><a href="global.html#itemXtype">itemXtype</a></li><li><a href="global.html#items">items</a></li><li><a href="global.html#jsonFormatter">jsonFormatter</a></li><li><a href="global.html#label">label</a></li><li><a href="global.html#lang">lang</a></li><li><a href="global.html#lastPage">lastPage</a></li><li><a href="global.html#layout">layout</a></li><li><a href="global.html#layoutAuto">layoutAuto</a></li><li><a href="global.html#layoutBorder">layoutBorder</a></li><li><a href="global.html#layoutContent">layoutContent</a></li><li><a href="global.html#layoutHbox">layoutHbox</a></li><li><a href="global.html#layoutItems">layoutItems</a></li><li><a href="global.html#layoutVbox">layoutVbox</a></li><li><a href="global.html#link">link</a></li><li><a href="global.html#listObject">listObject</a></li><li><a href="global.html#listObjects">listObjects</a></li><li><a href="global.html#listService">listService</a></li><li><a href="global.html#listeners">listeners</a></li><li><a href="global.html#load">load</a></li><li><a href="global.html#loadClass">loadClass</a></li><li><a href="global.html#loadCssFile">loadCssFile</a></li><li><a href="global.html#loadCtrlProperty">loadCtrlProperty</a></li><li><a href="global.html#loadData">loadData</a></li><li><a href="global.html#loadDocPages">loadDocPages</a></li><li><a href="global.html#loadFields">loadFields</a></li><li><a href="global.html#loadImage">loadImage</a></li><li><a href="global.html#loadIndex">loadIndex</a></li><li><a href="global.html#loadPlugin">loadPlugin</a></li><li><a href="global.html#loadScriptFile">loadScriptFile</a></li><li><a href="global.html#loadServiceApi">loadServiceApi</a></li><li><a href="global.html#loadServices">loadServices</a></li><li><a href="global.html#loadTemplateFile">loadTemplateFile</a></li><li><a href="global.html#mailTo">mailTo</a></li><li><a href="global.html#makeControl">makeControl</a></li><li><a href="global.html#makeObject">makeObject</a></li><li><a href="global.html#mappingUrl">mappingUrl</a></li><li><a href="global.html#maxLength">maxLength</a></li><li><a href="global.html#maxSize">maxSize</a></li><li><a href="global.html#md5">md5</a></li><li><a href="global.html#messageStyle">messageStyle</a></li><li><a href="global.html#metaInfo">metaInfo</a></li><li><a href="global.html#minSize">minSize</a></li><li><a href="global.html#model">model</a></li><li><a href="global.html#multiple">multiple</a></li><li><a href="global.html#name">name</a></li><li><a href="global.html#navigation">navigation</a></li><li><a href="global.html#newLine">newLine</a></li><li><a href="global.html#newRow">newRow</a></li><li><a href="global.html#next">next</a></li><li><a href="global.html#nextPage">nextPage</a></li><li><a href="global.html#nobr">nobr</a></li><li><a href="global.html#on">on</a></li><li><a href="global.html#onAfterInit">onAfterInit</a></li><li><a href="global.html#onAfterLayout">onAfterLayout</a></li><li><a href="global.html#onAfterRender">onAfterRender</a></li><li><a href="global.html#onAfterShow">onAfterShow</a></li><li><a href="global.html#onBeforeInit">onBeforeInit</a></li><li><a href="global.html#onBeforeLayout">onBeforeLayout</a></li><li><a href="global.html#onBeforeRender">onBeforeRender</a></li><li><a href="global.html#onBeforeShow">onBeforeShow</a></li><li><a href="global.html#onChanged">onChanged</a></li><li><a href="global.html#onPageSizeChanged">onPageSizeChanged</a></li><li><a href="global.html#on_checked">on_checked</a></li><li><a href="global.html#onchange">onchange</a></li><li><a href="global.html#ondelete">ondelete</a></li><li><a href="global.html#onload">onload</a></li><li><a href="global.html#onselect">onselect</a></li><li><a href="global.html#onview">onview</a></li><li><a href="global.html#openDB">openDB</a></li><li><a href="global.html#overflow">overflow</a></li><li><a href="global.html#pageIndexChanged">pageIndexChanged</a></li><li><a href="global.html#pageSizeList">pageSizeList</a></li><li><a href="global.html#page_type_changed">page_type_changed</a></li><li><a href="global.html#panelStyle">panelStyle</a></li><li><a href="global.html#patchButton">patchButton</a></li><li><a href="global.html#post">post</a></li><li><a href="global.html#postFileFromString">postFileFromString</a></li><li><a href="global.html#postFiles">postFiles</a></li><li><a href="global.html#pr_on_changed">pr_on_changed</a></li><li><a href="global.html#pr_rowdblclick">pr_rowdblclick</a></li><li><a href="global.html#previousPage">previousPage</a></li><li><a href="global.html#print">print</a></li><li><a href="global.html#printBorder">printBorder</a></li><li><a href="global.html#printCallStack">printCallStack</a></li><li><a href="global.html#proxy">proxy</a></li><li><a href="global.html#readFile">readFile</a></li><li><a href="global.html#readLocal">readLocal</a></li><li><a href="global.html#readOnly">readOnly</a></li><li><a href="global.html#readSession">readSession</a></li><li><a href="global.html#redirect">redirect</a></li><li><a href="global.html#refresh">refresh</a></li><li><a href="global.html#registerHotKey">registerHotKey</a></li><li><a href="global.html#remove">remove</a></li><li><a href="global.html#removeAll">removeAll</a></li><li><a href="global.html#removeCls">removeCls</a></li><li><a href="global.html#removeItem">removeItem</a></li><li><a href="global.html#removeLocal">removeLocal</a></li><li><a href="global.html#removeSession">removeSession</a></li><li><a href="global.html#renderTo">renderTo</a></li><li><a href="global.html#render_html">render_html</a></li><li><a href="global.html#requestService">requestService</a></li><li><a href="global.html#resetAjaxConfig">resetAjaxConfig</a></li><li><a href="global.html#response">response</a></li><li><a href="global.html#restart">restart</a></li><li><a href="global.html#rowclick">rowclick</a></li><li><a href="global.html#rowdblclick">rowdblclick</a></li><li><a href="global.html#rows">rows</a></li><li><a href="global.html#run">run</a></li><li><a href="global.html#saveAlbum">saveAlbum</a></li><li><a href="global.html#saveHandler">saveHandler</a></li><li><a href="global.html#scale">scale</a></li><li><a href="global.html#scrollCurrentIntoView">scrollCurrentIntoView</a></li><li><a href="global.html#scrollIntoView">scrollIntoView</a></li><li><a href="global.html#searchHandler">searchHandler</a></li><li><a href="global.html#select">select</a></li><li><a href="global.html#selectAll">selectAll</a></li><li><a href="global.html#selectColumn">selectColumn</a></li><li><a href="global.html#selectControl">selectControl</a></li><li><a href="global.html#selectNode">selectNode</a></li><li><a href="global.html#selectPage">selectPage</a></li><li><a href="global.html#selectRow">selectRow</a></li><li><a href="global.html#selected">selected</a></li><li><a href="global.html#selectedOnClick">selectedOnClick</a></li><li><a href="global.html#selectedOnDblClick">selectedOnDblClick</a></li><li><a href="global.html#selectorServices">selectorServices</a></li><li><a href="global.html#services">services</a></li><li><a href="global.html#setAppToken">setAppToken</a></li><li><a href="global.html#setControlProperty">setControlProperty</a></li><li><a href="global.html#setDisabled">setDisabled</a></li><li><a href="global.html#setDocumentIndex">setDocumentIndex</a></li><li><a href="global.html#setDocumentTitle">setDocumentTitle</a></li><li><a href="global.html#setDomToken">setDomToken</a></li><li><a href="global.html#setElAttribute">setElAttribute</a></li><li><a href="global.html#setElStyle">setElStyle</a></li><li><a href="global.html#setGlobalVariable">setGlobalVariable</a></li><li><a href="global.html#setHeaderVisible">setHeaderVisible</a></li><li><a href="global.html#setHref">setHref</a></li><li><a href="global.html#setNewButtons">setNewButtons</a></li><li><a href="global.html#setPageIndex">setPageIndex</a></li><li><a href="global.html#setPaging">setPaging</a></li><li><a href="global.html#setPosition">setPosition</a></li><li><a href="global.html#setSearchColumns">setSearchColumns</a></li><li><a href="global.html#setUrlParam">setUrlParam</a></li><li><a href="global.html#setValue">setValue</a></li><li><a href="global.html#set_data">set_data</a></li><li><a href="global.html#showAlbumsDetail">showAlbumsDetail</a></li><li><a href="global.html#showDialog">showDialog</a></li><li><a href="global.html#showDialogOnLeft">showDialogOnLeft</a></li><li><a href="global.html#showDialogOnRight">showDialogOnRight</a></li><li><a href="global.html#showDropdownBox">showDropdownBox</a></li><li><a href="global.html#showError">showError</a></li><li><a href="global.html#showIndex">showIndex</a></li><li><a href="global.html#showItem">showItem</a></li><li><a href="global.html#showLoading">showLoading</a></li><li><a href="global.html#showModalDialog">showModalDialog</a></li><li><a href="global.html#showModelView">showModelView</a></li><li><a href="global.html#showTip">showTip</a></li><li><a href="global.html#showWaiting">showWaiting</a></li><li><a href="global.html#size">size</a></li><li><a href="global.html#sleep">sleep</a></li><li><a href="global.html#sort">sort</a></li><li><a href="global.html#src">src</a></li><li><a href="global.html#start">start</a></li><li><a href="global.html#statechange">statechange</a></li><li><a href="global.html#stop">stop</a></li><li><a href="global.html#submit">submit</a></li><li><a href="global.html#tabIndex">tabIndex</a></li><li><a href="global.html#templates">templates</a></li><li><a href="global.html#testServerHost">testServerHost</a></li><li><a href="global.html#text">text</a></li><li><a href="global.html#textMember">textMember</a></li><li><a href="global.html#timeout">timeout</a></li><li><a href="global.html#timing">timing</a></li><li><a href="global.html#title">title</a></li><li><a href="global.html#title_format">title_format</a></li><li><a href="global.html#toFormDataString">toFormDataString</a></li><li><a href="global.html#toHtml">toHtml</a></li><li><a href="global.html#toJson">toJson</a></li><li><a href="global.html#toJsonString">toJsonString</a></li><li><a href="global.html#toMultipartFormData">toMultipartFormData</a></li><li><a href="global.html#toPxValue">toPxValue</a></li><li><a href="global.html#toString">toString</a></li><li><a href="global.html#toggle">toggle</a></li><li><a href="global.html#toggleCls">toggleCls</a></li><li><a href="global.html#token">token</a></li><li><a href="global.html#transform">transform</a></li><li><a href="global.html#tree_select_ctrl">tree_select_ctrl</a></li><li><a href="global.html#types">types</a></li><li><a href="global.html#unResize">unResize</a></li><li><a href="global.html#updateObject">updateObject</a></li><li><a href="global.html#updateRow">updateRow</a></li><li><a href="global.html#updateService">updateService</a></li><li><a href="global.html#upload">upload</a></li><li><a href="global.html#uploadComplete">uploadComplete</a></li><li><a href="global.html#uploadProgress">uploadProgress</a></li><li><a href="global.html#uploadStart">uploadStart</a></li><li><a href="global.html#valueMember">valueMember</a></li><li><a href="global.html#viewAllImages">viewAllImages</a></li><li><a href="global.html#viewHandler">viewHandler</a></li><li><a href="global.html#warn">warn</a></li><li><a href="global.html#writeLocal">writeLocal</a></li><li><a href="global.html#writeSession">writeSession</a></li><li><a href="global.html#zoomView">zoomView</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Wed May 10 2023 10:57:22 GMT+0800 (中国标准时间)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>
